package com.liuwei.spring.cloud.junit.leetcode.map;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.TreeMap;

public class Sorted {
    public static void main(String[] args) {
        LinkedHashMap<Integer,Integer> map = new LinkedHashMap<Integer,Integer>();
        map.put(5,4);
        map.put(3,4);
        map.put(4,4);
        map.put(1,4);
        map.put(2,4);

        Iterator<Integer> it = map.keySet().iterator();
        while (it.hasNext()){
            Integer key = it.next();
            System.out.println(key);
        }
    }
}
